import React, { Component } from 'react';
import autoBind from 'react-autobind';
import { Link, browserHistory } from 'dva/router';
import { Accordion, Tag } from 'antd-mobile';

// style
import styles from './index.css';
import IconfontStyle from '../../../../assets/iconfont/iconfont.css';

class ProductionFooter extends Component {
	constructor(props) {
        super(props)
        autoBind(this)
    }
    onNavGoods() {
    	const { dispatch } = this.props
    	browserHistory.push('/')

    	dispatch({
    		type: 'meyley/changeHomeTabType',
    		payload: 'goods'
    	})
    }
	render() {
		const { onAddCart } = this.props
	 	return (
	 		<div className={styles['production-footer']}>
	 			<div className={styles["production-footer-item"]}>
	 				<i className={`${IconfontStyle['meyley-icon']} ${IconfontStyle['meyley-icon-soucang']}`} style={{fontSize: '0.50rem', display: 'block'}}/>
	 				<span style={{display: 'block', 'position': 'relative', top: '0.04rem'}}>收藏</span>
	 			</div>
	 			<div className={styles["production-footer-item"]}>
	 				<i className={`${IconfontStyle['meyley-icon']} ${IconfontStyle['meyley-icon-kefu']}`} style={{fontSize: '0.50rem', display: 'block'}}/>
	 				<span style={{display: 'block', 'position': 'relative', top: '0.04rem'}}>客服</span>
	 			</div>
	 			<div className={styles["production-footer-item"]} onClick={this.onNavGoods}>
	 				<i className={`${IconfontStyle['meyley-icon']} ${IconfontStyle['meyley-icon-buycard2']}`} style={{fontSize: '0.50rem', display: 'block'}}/>
	 				<span style={{display: 'block', 'position': 'relative', top: '0.04rem'}}>购物车</span>
	 			</div>
	 			<div className={styles["production-footer-item"]} style={{flex: 6, padding: 0}}>
	 				<div onClick={onAddCart} className={styles['production-footer-add']}>加入购物车</div>
	 			</div>
	 		</div>
	  	);
	}
};

ProductionFooter.propTypes = {
};

export default ProductionFooter
